<?php

namespace App\Http\Controllers\Admin\Setting;

use App\Http\Controllers\Controller;
use App\Repositories\Permission\PermissionRepository;
use Illuminate\Http\Request;

class PermissionController extends Controller
{
    public function __construct(Request $request, PermissionRepository $repository)
    {
        $this->request = $request;
        $this->repository = $repository;
    }

    public function index()
    {
        return $this->inertia('admin/setting/permission/index',[
            'data' => $this->repository->tree(),
            'title' => '权限管理',
        ]);
    }
}
